package com.example.web.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * 菜单树形结构
 */
public class MenuTree extends Menu {
    
    private List<MenuTree> children = new ArrayList<>();
    
    public List<MenuTree> getChildren() {
        return children;
    }
    
    public void setChildren(List<MenuTree> children) {
        this.children = children;
    }
    
    /**
     * 添加子菜单
     * @param child 子菜单
     */
    public void addChild(MenuTree child) {
        this.children.add(child);
    }
}